package com.jzm.base.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;

import com.jzm.base.mapper.MyMapper;

public class BaseServiceImpl<D extends MyMapper<T>, T> implements BaseService<D, T> {

	@Autowired
	protected D mapper;
	
	public List<T> selectAll(){
		return mapper.selectAll();
	}

	public void deleteByPrimaryKey(T t){
		mapper.deleteByPrimaryKey(t);
	}

	public int insert(T t){
		return mapper.insert(t);
	}

	public int insertSelective(T t){
		return mapper.insertSelective(t);
	}

	public int batchInsert(List<T> list){
		return mapper.insertList(list);
	}

	public T selectByPrimaryKey(T t){
		return mapper.selectByPrimaryKey(t);
	}

	public List<T> selectByExample(T t){
		return mapper.selectByExample(t);
	}
	
	public int updateByPrimaryKey(T t){
		return mapper.updateByPrimaryKey(t);
	}

	@Override
	public List<T> select(T t) {
		return mapper.select(t);
	}

}